\documentclass[onecolumn,11pt]{article}
%\documentclass[prodmode,acmtocs]{acmsmall}
\usepackage[top=54pt,bottom=54pt,left=64pt,right=64pt]{geometry}

\usepackage{tikz}
\usetikzlibrary{calc,positioning,fit,shapes,shapes.misc,%
  shadows,shadows.blur,backgrounds,chains}

\tikzset{
    myshadow/.style={drop shadow={shadow xshift=.1ex, shadow
            yshift=-.1ex, shadow scale=1.03}},
    myshade/.style={draw=none, line width=0, %draw=#1!50, %myshadow,
        %top color=white!70!#1, bottom color=#1, shading angle=30},
        fill=white!30!#1},
    fewshade/.style={myshade=few-#1},
    myboxshade/.style={line width=0, draw=none, %draw=#1!50,
        %top color=white!70!#1, bottom color=#1, shading angle=30,
        %drop shadow={shadow xshift=0.58mm, shadow yshift=-.58mm},
        fill=white!30!#1
    },
    node/.style={draw,circle,fewshade=\maincolor},
    transition/.style={->,very thick,shorten >=0pt,few-gray},
    box/.style={rounded corners,inner sep=.2cm,
      myboxshade=few-\maincolor!30!white,draw=few-\maincolor-bright},
}  

\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{amsmath, amsfonts, amssymb}
\usepackage{bm}
\usepackage[xetex]{hyperref}
%\usepackage[all]{hypcap}

%\usepackage{glossaries}
%\makeglossaries

% Not ACM compliant, but much better looking
% \usepackage[notext]{stix} 
% \def\UrlFont{\ttfamily}
% \renewcommand{\ttdefault}{txtt}

\usepackage{booktabs,colortbl,tabu}
\usepackage{xspace}

%%%%%%%%%%%%%%%%%%%%
\usepackage{xcolor}
\definecolor{few-gray-bright}{HTML}{010202}
\definecolor{few-red-bright}{HTML}{EE2E2F}
\definecolor{few-green-bright}{HTML}{008C48}
\definecolor{few-blue-bright}{HTML}{185AA9}
\definecolor{few-orange-bright}{HTML}{F47D23}
\definecolor{few-purple-bright}{HTML}{662C91}
\definecolor{few-brown-bright}{HTML}{A21D21}
\definecolor{few-pink-bright}{HTML}{B43894}

\definecolor{few-gray}{HTML}{737373}
\definecolor{few-red}{HTML}{F15A60}
\definecolor{few-green}{HTML}{7AC36A}
\definecolor{few-blue}{HTML}{5A9BD4}
\definecolor{few-orange}{HTML}{FAA75B}
\definecolor{few-purple}{HTML}{9E67AB}
\definecolor{few-brown}{HTML}{CE7058}
\definecolor{few-pink}{HTML}{D77FB4}

\definecolor{few-gray-light}{HTML}{CCCCCC}
\definecolor{few-red-light}{HTML}{F2AFAD}
\definecolor{few-green-light}{HTML}{D9E4AA}
\definecolor{few-blue-light}{HTML}{B8D2EC}
\definecolor{few-orange-light}{HTML}{F3D1B0}
\definecolor{few-purple-light}{HTML}{D5B2D4}
\definecolor{few-brown-light}{HTML}{DDB9A9}
\definecolor{few-pink-light}{HTML}{EBC0DA}

\newcommand{\maincolor}{orange}
\taburulecolor{few-\maincolor-bright}
%%%%%%%%%%%%%%%%%%%%

\usepackage{fontspec}
\usepackage[slantfont, boldfont]{xeCJK} % 允许斜体和粗体
% CJK字体
\setCJKmonofont[Path=fonts/]{SimHei.ttf} % 等宽
\setCJKsansfont[Path=fonts/,BoldFont={SimHei.ttf},ItalicFont={SimKai.ttf}]{SimSun.ttf} % 无衬线
\setCJKmainfont[Path=fonts/,BoldFont={SimHei.ttf},ItalicFont={SimKai.ttf}]{SimSun.ttf} % 衬线
% 英文字体
\setmainfont[Mapping=tex-text,Path=fonts/]{LiberationSerif-Regular.ttf} % 衬线
\setsansfont[Mapping=tex-text,Path=fonts/]{LiberationSans-Regular.ttf} % 无衬线
\setmonofont[Mapping=tex-text,Path=fonts/]{LiberationMono-Regular.ttf} % 等宽
\punctstyle{kaiming} % 开明式标点格式
\usepackage{indentfirst} % 首段缩进
\setlength{\parindent}{2em}

\hypersetup{colorlinks, linkcolor=black,
  filecolor=black, urlcolor=black, citecolor=blue, pdftitle={恒星共识协议：互联网级共识的联邦模型}, pdfauthor={David Mazi{\`e}res}, pdfsubject={联邦拜占庭协议}, pdfkeywords={FBA, SCP}, pdfproducer={xelatex} }

\newtheorem{theorem}{定理}
%\newtheorem*{theorem*}{定理}
\newtheorem{lemma}{引理}[section]
%\newtheorem*{lemma*}{引理}[section]
\newtheorem{definition}{定义}[section]
%\newtheorem*{definition*}{定义}[section]
\newtheorem{proof}{证明}

\newcommand{\todo}[1]{{\footnotesize \textcolor{red}{$\ll$\textsf{TODO #1}$\gg$}}}%
\newcommand{\mybm}[1]{{\bm #1}}%
\newcommand{\quorum}{群体}
\newcommand{\slot}{存储单元}
\newcommand{\vblock}{$v-\!\!$阻塞}

\newcommand{\V}{\mathbf V}
\newcommand{\Q}[1]{\mathbf Q(#1)}
\newcommand{\VQ}{\ifmmode\langle\V,\mathbf Q\rangle\else
  $\langle\V,\mathbf Q\rangle$\fi\xspace}
\newcommand{\Qb}{\mathbf{Q}^B}
\newcommand{\VQb}{$\langle\V,\mathbf Q\rangle^B$\xspace}
\newcommand{\VQbn}[1]{$\langle\V,\mathbf{Q}\rangle^{B_{#1}}$\xspace}

\renewcommand{\figurename}{图}
\renewcommand\refname{参考文献}
\renewcommand{\abstractname}{摘\hspace{2em}要}

\newcommand{\FBA}{SCP\@\xspace}
\newcommand{\na}{\ensuremath{\bar a}}
\newcommand\confirm[1]{\ensuremath\textrm{accept}(#1)}
\newcommand{\bzero}{\ifmmode\mathbf 0\else$\mathbf 0$\xspace\fi}
\newcommand\ratified[1]{\ensuremath\textrm{ratified}(#1)}

\def\sectionautorefname{节}
\def\subsectionautorefname{节}
\def\subsubsectionautorefname{节}
\def\globaltheoremautorefname{定理}

\title{恒星共识协议：互联网级共识的联邦模型}
\author{David Mazi{\`e}res\\恒星发展基金会}
\date{}

\begin{document}
\maketitle

\input{tex/0-abstract}
\input{tex/1-intro}
\input{tex/2-related}
\input{tex/3-fba}
\input{tex/4-resilience}
\input{tex/5-voting}
\input{tex/6-scp}
\input{tex/7-limitations}
\input{tex/8-summary}
\input{tex/app1-ack}
\input{tex/app2-disclaimer}
\input{tex/appendix}
%\input{tex/appA-glossary}
%\printglossaries

%\bibliographystyle{abbrv}
\bibliographystyle{plain}
\bibliography{ref}


\end{document}
